package com.sondertara.joya.core.po;

import lombok.Getter;
import lombok.Setter;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.PrePersist;
import javax.persistence.PreUpdate;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

@Getter
@Setter
@Entity
@Table(name = "n_app_du")
public class NAppDuPo implements Serializable {
    @Id
    @Column(name = "id")
    private Long id;

    /*部署单元id*/
    @Column(name = "du_id")
    private Long duId;

    /*云平台物理子系统id*/
    @Column(name = "app_id")
    private Long appId;

    /*物理子系统编号*/
    @Column(name = "app_sys_code")
    private String appSysCode;


    /*安全区域*/
    @Column(name = "secure_area_code")
    private String secureAreaCode;

    /*英文名称*/
    @Column(name = "du_name")
    private String duName;


    /*是否有效*/
    @Column(name = "is_active")
    private String isActive;


    /*部署单元类型*/
    @Column(name = "du_type_code")
    private String duTypeCode;

    /*服务套餐id*/
    @Column(name = "service_set_id")
    private Long serviceSetId;

    /*安全分层*/
    @Column(name = "secure_tier_code")
    private String secureTierCode;

    /*服务类型*/
    @Column(name = "service_type_code")
    private String serviceTypeCode;


    /*部署单元中文名*/
    @Column(name = "cname")
    private String cname;

    /*安全节点*/
    @Column(name = "secure_node")
    private String secureNode;

    /*是否新一代*/
    @Column(name = "is_new")
    private String isNew;


    /*cmdb对应id*/
    @Column(name = "cmdb_du_id")
    private String cmdbDuId;

    /*数据中心名称*/
    @Column(name = "datacenter_id")
    private Long datacenterId;

    /*平台类型编码*/
    @Column(name = "platform_type_code")
    private String platformTypeCode;


    /*软件类型标识*/
    @Column(name = "software_os_id")
    private Long softwareOsId;

    /*高可用类型*/
    @Column(name = "ha_type_code")
    private String haTypeCode;

    /*部署平台*/
    @Column(name = "p_type_code")
    private String pTypeCode;


    /*部署单元状态编码*/
    @Column(name = "du_status_code")
    private String duStatusCode;

    /*运维单位id*/
    @Column(name = "maintein_org_id")
    private Long mainteinOrgId;

    /*运维部室id*/
    @Column(name = "maintein_dept_id")
    private Long mainteinDeptId;

    /*运维群组id*/
    @Column(name = "maintein_group_id")
    private Long mainteinGroupId;


    /*备注*/
    @Column(name = "remark")
    private String remark;

    /*软件操作系统类型*/
    @Column(name = "software_os_type")
    private String softwareOsType;

    /*是否开启监控*/
    @Column(name = "is_tpms_on")
    private String isTpmsOn;


    /*环境属性(PRODUCT：生产 backup：灾备)*/
    @Column(name = "enattr")
    private String enattr;


    /*最后更新人*/
    @Column(name = "last_update_time")
    private Date lastUpdateTime;


    /*维护窗口*/
    @Column(name = "maintenance_time")
    private String maintenanceTime;

    /*部署单元标签*/
    @Column(name = "du_tags")
    private String duTags;

    private Date modifyTime;
    /**
     * 云服务套餐CPU
     */
    private Integer serviceSetCpu;
    private Integer serviceSetMem;
    private String serviceSetName;
    /**
     * 功能描述
     */
    private String funcDesc;
    /**
     * 业务影响
     */
    private String busiImpact;

    @PrePersist
    @PreUpdate
    public void genModifyTime() {
        this.modifyTime = new Date();

    }

}
